<template>
	<sb-loading-full ref='loadingRef'>
		<view v-if='info' class="pad30 bg-grey container">
			<sb-mine-btn @click.native="$copy(info.content)" />
			<sb-back-icon @click.native='$back' />
			<view class="bg-white radius20 pad20">
				<u-parse :html='info.content'></u-parse>
			</view>
		</view>
	</sb-loading-full>
</template>
<script>
	export default {
		data() {
			return {
				info: null,
				picList: [],
				qs: {
					page: 1,
					size: 20
				}
			};
		},
		computed: {

		},
		onLoad({ id }) {
			this.id = id
		},
		onReady() {
			this.getDetail();
			// this.getList()
		},
		onShareAppMessage() {

		},
		onShareTimeline() {

		},
		methods: {
			async getDetail() {
				try {
					this.$refs.loadingRef.show()
					let { success, data } = await this.$get("/article/" + this.id, {}, false);
					if (success) {
						this.info = data
					}
				} finally {
					this.$refs.loadingRef.hide()
				}
			},
			async getList() {
				uni.showLoading({
					title: "正在加载下一部分"
				})
				let { success, data } = await this.$get("/article", this.qs, false);
				if (success) {
					this.picList = this.picList.concat(data.rows)
				}
				uni.hideLoading()
			},
		},
	};
</script>

<style lang="scss" scoped>
	.container {
		/deep/ {
			.u-tabbar__content {
				position: absolute;
			}

			.u-sticky {
				background-color: #fff;
			}
		}
	}
</style>
